// The ui-variables file is provided by base themes provided by Atom.
//
// See https://github.com/atom/atom-dark-ui/blob/master/styles/ui-variables.less
// for a full listing of what's available.
@import "ui-variables";

@power-color: #4EFFA1;

@font-face {
  font-family: "Press Start 2P";
  src: url("atom://activate-power-mode/fonts/PressStart2P-Regular.ttf")  format("truetype");
}

.power-mode-canvas {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  pointer-events: none;
}

atom-text-editor .scroll-view {
  will-change: transform;
}

.streak-container {
  font-family: "Press Start 2P", sans-serif;
  position: absolute;
  z-index: 10;
  right: 20px;
  top: 5px;
  text-align: right;
  pointer-events: none;

  .title {
    color: white;
    text-shadow: 2px 2px 2px @power-color;
    font-size: 16px;
  }

  .max {
    color: @power-color;
    font-size: 13px;
  }

  .bar {
    position: relative;
    opacity: 0.5;
    margin-top: 10px;
    height: 8px;
    background: @power-color;
    width: 100%;
    transform: scaleX(0);
  }

  .counter {
    margin-top: 10px;
    font-size: 60px;
    color: @power-color;
    line-height: 1;

    &.bump {
      animation: grow 0.25s both;
    }
  }

  .exclamations {
    position: absolute;
    bottom: -10px;
    right: 0;
    display: block;
    color: @power-color;
    opacity: 0.75;
    font-size: 20px;
    text-align: right;

    .exclamation {
      right: 0;
      top: 0;
      display: block;
      position: absolute;
      min-width: 200px;
      animation: exclamation 1.5s ease-out both;

      &.message,
      &.error,
      &.level,
      &.max-combo {
        margin-right: 40px;
      }

      &.up,
      &.down {
        font-size: 15px;
      }

      &.down,
      &.error {
        color: #ee3c3c;
      }

      &.level,
      &.max-combo {
        color: #ffed4b;
      }
    }
  }

  .generate-levels(5);
}

@keyframes grow {
  0% {
    animation-timing-function: ease-out;
  }
  50% {
    transform: scale(1.3);
    animation-timing-function: ease-in;
  }
}

@keyframes exclamation {
  100% {
    opacity: 0;
    transform: translate3D(0, 100px, 0);
  }
}

.generate-levels(@i) when (@i > 0) {
  @levelColor: spin(@power-color, (@i * 35));
  &.level-@{i} {
    .title {
      text-shadow: 2px 2px 2px @levelColor;
    }

    .counter,
    .exclamations,
    .max {
      color: @levelColor;
    }

    .bar {
      background: @levelColor;
    }
  }
  .generate-levels(@i - 1);
}

.effect-list,
.plugin-list {
  li {
    height:auto;
    margin-left:auto;
    margin-right:auto;
    padding-bottom: 20px;

    overflow: hidden;
  }

  li img {
    max-width: 80px;
    max-height: 80px;
    float: right;
  }
}

#activate-power-mode\.particles\.effect,
#activate-power-mode\.flow {
  pointer-events:none;
}
